<?php
class goods_hook
{

	/**
	 * 系统初始化钩子
	 */
	public function pre_system() {
		// var_dump('hook:pre_system is Initialized');
	}

	/* 控制器方法之前 */
	public function pre_control() {
		// var_dump('hook:pre_control is Initialized');
	}

	/* 控制器方法之后 */
	public function post_control() {
		// var_dump('hook:post_control is Initialized');
	}

	/**
	 * 登陆成功之后:{加入购物车、发送推送邮件等等}
	 */
	public function after_login($params) {
		model('order/cart','service')->cart_sync();
		model('member/member','service')->action_exp($params['id'],0);
	}
	/**
	 * 注册成功之后:{加入购物车、发送推送邮件等等}
	 */
	public function after_register(){
		model('order/cart','service')->cart_sync();
	}

}